<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/report/report/View_ReportOutStockTotal.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/report/report/View_ReportOutStockTotal2.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '销售出库汇总(无价格)',
                name: 'report/View_ReportOutStockTotal',
                url: "/View_ReportOutStockTotal/",
                sortName: "FCuName"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"OrgCode":"","FCuName":"","FDate":"","FNumber":"","FCuyName":""});
            const searchFormOptions = ref([[{"dataKey":"Org","data":[],"title":"组织编号","field":"OrgCode","type":"select"},{"title":"出货日期","field":"FDate","type":"date"},{"title":"客户名称","field":"FCuName","type":"like"}],[{"title":"HDM产品料号","field":"FNumber","type":"like"},{"title":"原币","field":"FCuyName","type":"like"}]]);
            const columns = ref([{field:'OrgCode',title:'组织编号',type:'string',bind:{ key:'Org',data:[]},width:80,hidden:true,require:true,align:'left'},
                       {field:'FBillNo',title:'HDM订单号',type:'string',width:150,require:true,align:'left',sort:true},
                       {field:'FOrderBillNo',title:'客户订单号',type:'string',width:130,require:true,align:'left'},
                       {field:'FCuCode',title:'客户编号',type:'string',width:80,hidden:true,require:true,align:'left'},
                       {field:'FCuName',title:'客户名称',type:'string',width:220,align:'left'},
                       {field:'PODate',title:'订单日期',type:'date',width:110,align:'left',sort:true},
                       {field:'FDate',title:'出货日期',type:'date',width:110,require:true,align:'left',sort:true},
                       {field:'FNumber',title:'HDM产品料号',type:'string',width:180,align:'left'},
                       {field:'FMapNumber',title:'客户产品料号',type:'string',width:160,align:'left'},
                       {field:'FName',title:'产品名称',type:'string',width:100,align:'left'},
                       {field:'FQty',title:'订单数量',type:'decimal',width:100,require:true,align:'left'},
                       {field:'FCuyName',title:'原币',type:'string',width:100,align:'left'},
                       {field:'FExchangeRate',title:'汇率',type:'decimal',width:100,align:'left'},
                       {field:'FStockQty',title:'累计出库数',type:'decimal',width:120,align:'left'},
                       {field:'FUnStockQty',title:'未出库数',type:'decimal',width:120,align:'left'},
                       {field:'IFQty',title:'即时库存',type:'decimal',width:120,align:'left'},
                       {field:'QueStockQty',title:'时段出库数',type:'decimal',width:120,align:'left'},
                       {field:'ID',title:'ID',type:'guid',width:80,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
